public class NoEnoughPapersException extends Exception {
    private final String studentName;
    private final int desiredCount;
    private final int availableCount;

    public NoEnoughPapersException(String studentName, int desiredCount, int availableCount) {
        super("学生 " + studentName + " 希望选论文 " + desiredCount + " 篇，但目前只有 " + availableCount + " 篇可选");
        this.studentName = studentName;
        this.desiredCount = desiredCount;
        this.availableCount = availableCount;
    }

    public String getStudentName() {
        return studentName;
    }

    public int getDesiredCount() {
        return desiredCount;
    }

    public int getAvailableCount() {
        return availableCount;
    }
}    